Integrand size = 27, antiderivative size = 51 \[ \int \csc (c+d x) (a+a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=-\frac {3 a A \text {arctanh}(\cos (c+d x))}{2 d}-\frac {2 a A \cot (c+d x)}{d}-\frac {a A \cot (c+d x) \csc (c+d x)}{2 d} \]
Leaf count is larger than twice the leaf count of optimal. \(137\) vs. \(2(51)=102\).
Time = 0.11 (sec) , antiderivative size = 137, normalized size of antiderivative = 2.69 \[ \int \csc (c+d x) (a+a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=-\frac {2 a A \cot (c+d x)}{d}-\frac {a A \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {a A \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a A \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a A \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a A \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a A \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \]
(-2*a*A*Cot[c + d*x])/d - (a*A*Csc[(c + d*x)/2]^2)/(8*d) - (a*A*Log[Cos[c/ 2 + (d*x)/2]])/d - (a*A*Log[Cos[(c + d*x)/2]])/(2*d) + (a*A*Log[Sin[c/2 + (d*x)/2]])/d + (a*A*Log[Sin[(c + d*x)/2]])/(2*d) + (a*A*Sec[(c + d*x)/2]^2 )/(8*d)
Time = 0.42 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.16, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2011, 3042, 4275, 3042, 4254, 24, 4534, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc (c+d x) (a \csc (c+d x)+a) (A \csc (c+d x)+A) \, dx\) |
\(\Big \downarrow \) 2011 |
\(\displaystyle \frac {A \int \csc (c+d x) (\csc (c+d x) a+a)^2dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \int \csc (c+d x) (\csc (c+d x) a+a)^2dx}{a}\) |
\(\Big \downarrow \) 4275 |
\(\displaystyle \frac {A \left (2 a^2 \int \csc ^2(c+d x)dx+\int \csc (c+d x) \left (\csc ^2(c+d x) a^2+a^2\right )dx\right )}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \left (2 a^2 \int \csc (c+d x)^2dx+\int \csc (c+d x) \left (\csc (c+d x)^2 a^2+a^2\right )dx\right )}{a}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {A \left (\int \csc (c+d x) \left (\csc (c+d x)^2 a^2+a^2\right )dx-\frac {2 a^2 \int 1d\cot (c+d x)}{d}\right )}{a}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {A \left (\int \csc (c+d x) \left (\csc (c+d x)^2 a^2+a^2\right )dx-\frac {2 a^2 \cot (c+d x)}{d}\right )}{a}\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle \frac {A \left (\frac {3}{2} a^2 \int \csc (c+d x)dx-\frac {2 a^2 \cot (c+d x)}{d}-\frac {a^2 \cot (c+d x) \csc (c+d x)}{2 d}\right )}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \left (\frac {3}{2} a^2 \int \csc (c+d x)dx-\frac {2 a^2 \cot (c+d x)}{d}-\frac {a^2 \cot (c+d x) \csc (c+d x)}{2 d}\right )}{a}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {A \left (-\frac {3 a^2 \text {arctanh}(\cos (c+d x))}{2 d}-\frac {2 a^2 \cot (c+d x)}{d}-\frac {a^2 \cot (c+d x) \csc (c+d x)}{2 d}\right )}{a}\) |
(A*((-3*a^2*ArcTanh[Cos[c + d*x]])/(2*d) - (2*a^2*Cot[c + d*x])/d - (a^2*C ot[c + d*x]*Csc[c + d*x])/(2*d)))/a
3.1.3.3.1 Defintions of rubi rules used
Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Simp[(b/d)^m Int[u*(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, n}, x ] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c + d*x , a + b*x])
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[2*a*(b/d) Int[(d*Csc[e + f*x])^(n + 1), x], x] + Int[(d*Csc[e + f*x])^n*(a^2 + b^2*Csc[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Time = 0.76 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.31
method | result | size |
parallelrisch | \(\frac {A a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-8 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+12 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{8 d}\) | \(67\) |
derivativedivides | \(\frac {A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )-2 A a \cot \left (d x +c \right )+A a \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d}\) | \(71\) |
default | \(\frac {A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )-2 A a \cot \left (d x +c \right )+A a \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d}\) | \(71\) |
parts | \(-\frac {A a \ln \left (\csc \left (d x +c \right )+\cot \left (d x +c \right )\right )}{d}+\frac {A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}-\frac {2 a A \cot \left (d x +c \right )}{d}\) | \(75\) |
norman | \(\frac {\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {A a}{8 d}-\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {3 A a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) | \(90\) |
risch | \(\frac {A a \left ({\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}-4 i {\mathrm e}^{2 i \left (d x +c \right )}+4 i\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {3 A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}-\frac {3 A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}\) | \(92\) |
1/8*A*a*(tan(1/2*d*x+1/2*c)^2-cot(1/2*d*x+1/2*c)^2+8*tan(1/2*d*x+1/2*c)-8* cot(1/2*d*x+1/2*c)+12*ln(tan(1/2*d*x+1/2*c)))/d
Leaf count of result is larger than twice the leaf count of optimal. 103 vs. \(2 (47) = 94\).
Time = 0.24 (sec) , antiderivative size = 103, normalized size of antiderivative = 2.02 \[ \int \csc (c+d x) (a+a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=\frac {8 \, A a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 2 \, A a \cos \left (d x + c\right ) - 3 \, {\left (A a \cos \left (d x + c\right )^{2} - A a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left (A a \cos \left (d x + c\right )^{2} - A a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
1/4*(8*A*a*cos(d*x + c)*sin(d*x + c) + 2*A*a*cos(d*x + c) - 3*(A*a*cos(d*x + c)^2 - A*a)*log(1/2*cos(d*x + c) + 1/2) + 3*(A*a*cos(d*x + c)^2 - A*a)* log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^2 - d)
\[ \int \csc (c+d x) (a+a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=A a \left (\int \csc {\left (c + d x \right )}\, dx + \int 2 \csc ^{2}{\left (c + d x \right )}\, dx + \int \csc ^{3}{\left (c + d x \right )}\, dx\right ) \]
A*a*(Integral(csc(c + d*x), x) + Integral(2*csc(c + d*x)**2, x) + Integral (csc(c + d*x)**3, x))
Time = 0.24 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.57 \[ \int \csc (c+d x) (a+a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=\frac {A a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 4 \, A a \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right ) - \frac {8 \, A a}{\tan \left (d x + c\right )}}{4 \, d} \]
1/4*(A*a*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) - log(cos(d*x + c) + 1) + lo g(cos(d*x + c) - 1)) - 4*A*a*log(cot(d*x + c) + csc(d*x + c)) - 8*A*a/tan( d*x + c))/d
Time = 0.28 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.82 \[ \int \csc (c+d x) (a+a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=\frac {A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 8 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {18 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + A a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
1/8*(A*a*tan(1/2*d*x + 1/2*c)^2 + 12*A*a*log(abs(tan(1/2*d*x + 1/2*c))) + 8*A*a*tan(1/2*d*x + 1/2*c) - (18*A*a*tan(1/2*d*x + 1/2*c)^2 + 8*A*a*tan(1/ 2*d*x + 1/2*c) + A*a)/tan(1/2*d*x + 1/2*c)^2)/d
Time = 19.70 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.65 \[ \int \csc (c+d x) (a+a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=\frac {3\,A\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {A\,a}{8}+A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d}+\frac {A\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d} \]